{% extends "learning_logs/base.html" %}
{% load bootstrap3 %}

{% block header %}
    <h2>请登录你的账号：</h2>
{% endblock header %}

{% block content %}

    {% if form.errors %}
        <p>用户名或密码错误，请重试！</p>
    {% endif %}

    <form method="post" action="{% url 'users:login' %}" >
        {% csrf_token %}
        {% bootstrap_form form %}
        {% buttons %}
            <button type="submit" class="btn btn-primary">登　录</button>
        {% endbuttons %}
        
        <input type="hidden" name="next" value="{% url 'learning_logs:index' %}" />
    </form>

{% endblock content %} 